package com.mmd.admin.model.pojo.request;

import com.mmd.base.annotation.valid.group.ValidGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.*;
import java.math.BigDecimal;

@Data
@ApiModel("管理员新增编辑参数")
public class IndustryAddOrEditParam {
    @ApiModelProperty("id")
    private Long id=0L;

    @ApiModelProperty(value = "名称")
    @NotBlank(message = "名称不能为空")
    @Length(max = 10,message = "行业名称不能超过10",groups = {ValidGroup.Insert.class,ValidGroup.Update.class})
    private String name;

    @ApiModelProperty("保证金额")
    @DecimalMin(value = "1",message = "保证金额最低1元",groups = {ValidGroup.Insert.class,ValidGroup.Update.class})
    private BigDecimal ensureMoney;

}
